﻿<UserControl x:Class="CrazyWorship1.AssetManagerControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:c="clr-namespace:CrazyWorship1"
             xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase" 
    Height="300" Width="300">
    <Grid>
        <Grid.Resources>
            <c:StatusToHiddenVisibility x:Key="StatusToVisibility"/>
            <c:StatusToHiddenVisibility2 x:Key="StatusToVisibility2"/>
        </Grid.Resources>
        <ListBox x:Name="listBox1" ItemsSource="{Binding Path=AssetManager.SongList}">
            <ListBox.ItemTemplate>
                <DataTemplate >
                    <StackPanel>
                        <TextBlock Visibility="{Binding Path=Status, Converter={StaticResource StatusToVisibility}}" Text="{Binding Path=Name}" Foreground="Red"/>
                        <TextBlock Visibility="{Binding Path=Status, Converter={StaticResource StatusToVisibility2}}" Text="{Binding Path=Name}" Foreground="Green"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>
